import React, { Component } from 'react';
import { Button, WhiteSpace } from 'antd-mobile';
import { connect } from 'dva';
import { routerRedux } from 'dva/router'

@connect(({ list, loading }) => ({
  list,
  loading: loading.models.list,
}))
class HomePage extends Component {
  getList=()=>{
    this.props.dispatch(routerRedux.push('/test'));
  }
  render() {
    return (
      <div>
        <Button onClick={this.getList}>loading button</Button>
        <WhiteSpace />
      </div>
    );
  }
}
export default HomePage;
